home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6192 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  38 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: chang.unx.sas.com!walker
  3. From: walker@chang.unx.sas.com (Doug Walker)
  4. Subject: Re: Ceck out this bug. Wh
  5. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  6. Message-ID: <DotxtC.K13@unx.sas.com>
  7. Date: Mon, 25 Mar 1996 15:31:59 GMT
  8. X-Nntp-Posting-Host: chang.unx.sas.com
  9. References: <1120.6643T91T406@login.eunet.no> <885.6646T9T693@login.eunet.no> <755.6652T1180T2805@login.eunet.no> <64_5607@tna.nullnet.fi>
  10. Organization: SAS Institute Inc.
  11.  
  12. In article <64_5607@tna.nullnet.fi>,
  13. Marcus Alanen <marcus.alanen@tna.nullnet.fi> wrote:
  14. >>>You should change the value in your code by adding the following line
  15. >>>external to any function:
  16. >>>   long _STKNEED = 1024;
  17. >> Yeah, it will do, but its a litte anoying having it in the source
  18. >> though.
  19. >
  20. >    Hmm... isn't there a way to know how much stack space a function
  21. >    allocates? THen it would be possible for the compiler to automatically
  22. >    set the "long _STKNEED = xxxxx" line when compiling the program.
  23. >    Or have I missed something here?-)
  24.  
  25. Yes, it is possible to know how much stack space a function allocates.  This
  26. is indeed how stack extension works in the first place.  But _STKNEED is not
  27. used to provide stack space for the current function - it is used to provide
  28. stack space for any functions CALLED by the current function, if those 
  29. called functions are not compiled with stack extension.
  30.  
  31. --Doug
  32. -- 
  33.   *****     
  34.  *|_o_o|\\     Doug Walker   walker@unx.sas.com  
  35.  *|. o.| ||                
  36.   | o  |//     Any opinions are mine, not those of SAS Institute, Inc.
  37.   ====== 
  38.